package com.grm.distributed.lock.common;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    private int code;
    private String message;
    private Object data;

    public static Result success(){
        return new Result(200,"success",null);
    }

    public static Result success(Object data){
        return new Result(200,"success",data);
    }

    public static Result failed(int code,String message){
        return new Result(code,message,null);
    }
}
